<?php

namespace Kaller\TicketsBundle\Entity;

/**
 * Kaller\TicketsBundle\Entity\Ticket
 *
 * @orm:Table()
 * @orm:Entity
 */
class Ticket
{
    /**
     * Belső azonosító
     *
     * @var integer $id
     *
     * @orm:Column(name="id", type="integer")
     * @orm:Id
     * @orm:GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * A szülő azonosítója (ha van)
     * (egyébként 0)
     *
     * @var integer $parent_id
     *
     * @orm:Column(name="parentid", type="integer")
     *
     * @orm:ManyToOne(targetEntity="Ticket")
     */
    private $parent_id;

    /**
     * Egyedi "külső" azonosító: #KSZK1234
     *
     * @var string $reference
     *
     * @orm:Column(name="reference", type="string", length=255)
     */
    private $reference;

    /**
     * Tulajdonos, létrehozó felhasználó
     * (ha 0, akkor nincs regelve -> username, useremail)
     *
     * @var integer $owner_id
     *
     * @orm:Column(name="owner_id", type="integer")
     *
     * @orm:ManyToOne(targetEntity="User")
     */
    private $owner_id;

    /**
     * Felelős felhasználó
     * 
     * @var integer $responsible_id
     *
     * @orm:Column(name="responsible_id", type="integer")
     *
     * @orm:ManyToOne(targetEntity="User")
     */
    private $responsible_id;

    /**
     * Tartalmazó kategória
     *
     * @var integer $category_id
     *
     * @orm:Column(name="category_id", type="integer")
     *
     * @orm:ManyToOne(targetEntity="Category")
     */
    private $category_id;

    /**
     * Ticket állapota
     *
     * @var integer $status
     *
     * @orm:Column(name="status", type="integer")
     */
    private $status;

    /**
     * Beküldés ideje
     *
     * @var datetime $time
     *
     * @orm:Column(name="time", type="datetime")
     */
    private $time;

    /**
     * Ticket tárgya
     *
     * @var  $title
     *
     * @orm:Column(name="title", type="string", length=255)
     */
    private $title;

    /**
     * Feladó neve, ha nem regelt
     * 
     * @var string $username
     *
     * @orm:Column(name="username", type="string", length=255)
     */
    private $username;

    /**
     * Feladó e-mail címe, ha nem regelt
     * 
     * @var string $useremail
     *
     * @orm:Column(name="useremail", type="string", length=255)
     */
    private $useremail;

    /**
     *
     * Visszaadja a hozzá tartozó alticketeket (ha van)
     *
     */
    public function getSubTickets()
    {
        //return ...
    }


    /************************* Getters and Setters *************************/


    /**
     * Get id
     *
     * @return integer $id
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set parent_id
     *
     * @param integer $parentId
     */
    public function setParentId($parentId)
    {
        $this->parent_id = $parentId;
    }

    /**
     * Get parent_id
     *
     * @return integer $parentId
     */
    public function getParentId()
    {
        return $this->parent_id;
    }

    /**
     * Set reference
     *
     * @param string $reference
     */
    public function setReference($reference)
    {
        $this->reference = $reference;
    }

    /**
     * Get reference
     *
     * @return string $reference
     */
    public function getReference()
    {
        return $this->reference;
    }

    /**
     * Set owner_id
     *
     * @param integer $ownerId
     */
    public function setOwnerId($ownerId)
    {
        $this->owner_id = $ownerId;
    }

    /**
     * Get owner_id
     *
     * @return integer $ownerId
     */
    public function getOwnerId()
    {
        return $this->owner_id;
    }

    /**
     * Set responsible_id
     *
     * @param integer $responsibleId
     */
    public function setResponsibleId($responsibleId)
    {
        $this->responsible_id = $responsibleId;
    }

    /**
     * Get responsible_id
     *
     * @return integer $responsibleId
     */
    public function getResponsibleId()
    {
        return $this->responsible_id;
    }

    /**
     * Set category_id
     *
     * @param integer $categoryId
     */
    public function setCategoryId($categoryId)
    {
        $this->category_id = $categoryId;
    }

    /**
     * Get category_id
     *
     * @return integer $categoryId
     */
    public function getCategoryId()
    {
        return $this->category_id;
    }

    /**
     * Set status
     *
     * @param integer $status
     */
    public function setStatus($status)
    {
        $this->status = $status;
    }

    /**
     * Get status
     *
     * @return integer $status
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Set time
     *
     * @param datetime $time
     */
    public function setTime($time)
    {
        $this->time = $time;
    }

    /**
     * Get time
     *
     * @return datetime $time
     */
    public function getTime()
    {
        return $this->time;
    }

    /**
     * Set title
     *
     * @param string $title
     */
    public function setTitle($title)
    {
        $this->title = $title;
    }

    /**
     * Get title
     *
     * @return string $title
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set username
     *
     * @param string $username
     */
    public function setUsername($username)
    {
        $this->username = $username;
    }

    /**
     * Get username
     *
     * @return string $username
     */
    public function getUsername()
    {
        return $this->username;
    }

    /**
     * Set useremail
     *
     * @param string $useremail
     */
    public function setUseremail($useremail)
    {
        $this->useremail = $useremail;
    }

    /**
     * Get useremail
     *
     * @return string $useremail
     */
    public function getUseremail()
    {
        return $this->useremail;
    }
}